#include <bits/stdc++.h>
using namespace std;
const int MAX=1e5+1;
int n,a[MAX],m,s;
map<int,int>b;
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> n;
    int j=1;
    for (int i = 1; i <= n; i++)
    {
        cin >> m;
        b[m]++;
    }
    for(auto &i:b){
        a[j]= i.first;
        s+=i.second;
        j++;
    }
    for (int i = 2; i <= j; i++)
    {
        int tmp=min(b[a[i-1]],b[a[i]]);
        s-=tmp;
        b[a[i]]+=b[a[i-1]]-tmp;
    }
    printf("%d",s);
    return 0;
}